
export default function (time) {
	
	const day = new Date()
	
	const YYYY = day.getFullYear()
	
	const M = day.getMonth() + 1 
	
	const MM = M > 10 ? M : `0${M}`
	
	const D = day.getDate()
	
	const DD = D > 10 ? D : `0${D}`
	
	const today = `${YYYY}-${MM}-${DD}`
	
	const timer = `${YYYY}-${MM}`
	
	let stamp = null
	
	if (time) {
		
		stamp = Date.parse(new Date(`${time} 00:00:00`))
		
	}else{
		
		stamp = Date.parse(`${today} 00:00:00`)
		
	}
	
	return {
		today,
		stamp,
		timer
	}
}